package org.example3;

import java.lang.reflect.Field;
import java.lang.reflect.Method;

public class Main {
    public static void main(String[] args) throws NoSuchFieldException {

//        for (Method method : Outer.Inner.class.getDeclaredMethods()) {
//            System.out.println(method.getName() + " is synthetic: " + method.isSynthetic());
//        }

        Field values = Direct.class.getDeclaredField("$VALUES");


        System.out.println("$VALUES是否为合成字段:"+values.isSynthetic());


        for (Method method : Direct.class.getDeclaredMethods()) {
            System.out.println(method.getName() + " is synthetic: " + method.isSynthetic());
        }

        Outer.Inner inner = new Outer().new Inner();


        inner.printSecret();
    }
}
